package bravo;


/**
 * Write a description of class OperadorFolha here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class OperadorLeaf implements OperadorComponent
{
    // instance variables - replace the example below with your own
    private ConversorBase conversor;
    private String    operador;

    /**
     * Constructor for objects of class OperadorFolha
     */
    public OperadorLeaf(ConversorBase conversor, String operador)
    {
        // initialise instance variables
        this.conversor = conversor;
        this.operador = operador;
    }

    /**
     * An example of a method - replace this comment with your own
     * 
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y 
     */
    public String operadorNaBaseFinal(ConversorBase conversorFinal) {
        // put your code here
        String resultado = "";
        
        resultado = conversor.converteDe(operador);
        resultado = conversorFinal.convertePara(resultado);
        return resultado;
    }

}
